'use strict';

const Controller = require('egg').Controller;

class detailsController extends Controller {
  async index() {
    const { ctx, service } = this;
    // ctx.body = 'hi, details';
    const data = await service.user.GetInfo();
    await ctx.render('index.html', { datas: data });
  }
  async userinfo() {
    const { ctx, service, config } = this;
    const { id } = ctx.params;
    const data = await service.index.echo(id);
    console.log(config.api);
    ctx.body = data;
  }
}

module.exports = detailsController;
